<include file="public@header" />
<link rel="stylesheet" type="text/css" href="__STATIC__/layui/css/layui.css">
</head>
<body>
	<div class="wrap">
		<form method="post" class="form-horizontal js-ajax-form margin-top-20 layui-form" action="{:url('order/payment_add')}">
			<div class="form-group">
				<label class="col-sm-2 control-label">
					<span class="form-required">*</span>打款金额
				</label>
				<div class="col-md-3 col-sm-6">
			        <input type="text" class="form-control" name="amount">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">
					<span class="form-required">*</span>打款日期
				</label>
				<div class="col-md-3 col-sm-6">
			        <input type="text" class="form-control js-bootstrap-date" name="date">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">
					<span class="form-required">*</span>打款凭证
				</label>
				<div class="col-md-3 col-sm-10">
					<input type="hidden" name="image" id="thumb" value="">
                    <a href="javascript:uploadOneImage('图片上传','#thumb');">
                        <img src="__TMPL__/public/assets/images/default-thumbnail.png" id="thumb-preview"
                             width="135" style="cursor: hand"/>
                    </a>
                    <input type="button" class="btn btn-sm"
                           onclick="$('#thumb-preview').attr('src','__TMPL__/public/assets/images/default-thumbnail.png');$('#thumb').val('');return false;"
                           value="取消图片">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label">
					<span class="form-required">*</span>备注
				</label>
				<div class="col-md-3 col-sm-10">
					<input type="text" class="form-control" name="remark">
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-offset-2 col-sm-10">
					<input type="hidden" name="order_id" value="{:input('id')}">
					<button type="submit" class="btn btn-primary js-ajax-submit">{:lang('ADD')}</button>
				</div>
			</div>
		</form>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
	<script src="__STATIC__/layui/layui.js"></script>
	<script type="text/javascript">
		layui.use(['form'], function(){
			var form = layui.form;
		});

		function doSelectLocation(obj) {
	        var $obj       = $(obj);
	        var title      = $obj.data('title');
	        var $realInput = $obj;
	        var location   = $realInput.val();

	        openIframeLayer(
	            "{:url('index/map')}?location=" + location,
	            '选择定位',
	            {
	                area: ['700px', '90%'],
	            }
	        );
	    }
	</script>
	<script type="text/html" id="files-item-tpl">
    <li id="saved-file{id}">
        <input id="file-{id}" type="hidden" name="file_urls[]" value="{filepath}">
        <input class="form-control" id="file-{id}-name" type="text" name="file_names[]" value="{name}"
               style="width: 200px;" title="文件名称">
        <a id="file-{id}-preview" href="{preview_url}" target="_blank">下载</a>
        <a href="javascript:uploadOne('文件上传','#file-{id}','file');">替换</a>
        <a href="javascript:(function(){$('#saved-file{id}').remove();})();">移除</a>
    </li>
</script>
</body>
</html>